import request from '@/utils/request'

// 查询我的任务列表
export function listMission(query) {
  return request({
    url: '/cooperate/mission/list',
    method: 'get',
    params: query
  })
}

// 查询我的任务详细
export function getMission(id) {
  return request({
    url: '/cooperate/mission/detail/' + id,
    method: 'get'
  })
}

// 新增我的任务
export function addMission(data) {
  return request({
    url: '/cooperate/mission/create',
    method: 'post',
    data: data
  })
}

// 修改我的任务
export function updateMission(data) {
  return request({
    url: '/cooperate/mission/update',
    method: 'post',
    data: data
  })
}


// 删除我的任务
export function delMission(id) {
  return request({
    url: '/cooperate/mission/delete/' + id,
    method: 'post'
  })
}

// 任务转发
export function forwardMission(data) {
  return request({
    url: '/cooperate/mission/forward',
    method: 'post',
    data: data
  })
}

// 获取用户的可选人员部门树
export function getUserDeptTree(query) {
  return request({
    url: '/cooperate/project/getUserDeptTree',
    method: 'get',
    params: query
  })
}